<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Create a new PDF converter</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="wkhtmltox-pdf-converter.add.html">« wkhtmltox\PDF\Converter::add</a></li>
      <li style="float: right;"><a href="wkhtmltox-pdf-converter.convert.html">wkhtmltox\PDF\Converter::convert »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.wkhtmltox-pdf-converter.html">wkhtmltox\PDF\Converter</a></li>
    <li>Create a new PDF converter</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="wkhtmltox-pdf-converter.construct" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">wkhtmltox\PDF\Converter::__construct</h1>
  <p class="verinfo">(wkhtmltox &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">wkhtmltox\PDF\Converter::__construct</span> &mdash; <span class="dc-title">Create a new PDF converter</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-wkhtmltox-pdf-converter.construct-description">
  <h3 class="title">说明</h3>
  <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>wkhtmltox\PDF\Converter::__construct</strong></span>(<span class="methodparam"><span class="type">array</span> <code class="parameter">$settings</code><span class="initializer"> = ?</span></span>)</div>

  <p class="para rdfs-comment">
  Creates a PDF converter, using optional configuration settings
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-wkhtmltox-pdf-converter.construct-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>
<code class="parameter">settings</code></dt>

    <dd>

     <p class="para">
      <table class="doctable table">
       
       
        <thead>
         <tr>
          <th>Name</th>
          <th>Description</th>
          <th>Values</th>
          <th>Changelog</th>
         </tr>

        </thead>

        <tbody class="tbody">
         <tr>
          <td>size.pageSize</td>
          <td>paper size of output document</td>
          <td>A4</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>size.width</td>
          <td>with of the output document</td>
          <td>210mm</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>size.height</td>
          <td>height of the output document</td>
          <td>297mm</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>orientation</td>
          <td>orientation of the output document</td>
          <td>
           <table class="doctable table">
            
            
             <tbody class="tbody">
              <tr>
               <td>Landscape</td>
              </tr>

              <tr>
               <td>Portrait</td>
              </tr>

             </tbody>
            
           </table>

          </td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>colorMode</td>
          <td>color mode of the output document</td>
          <td>
           <table class="doctable table">
            
            
             <tbody class="tbody">
              <tr>
               <td>Color</td>
              </tr>

              <tr>
               <td>Greyscale</td>
              </tr>

             </tbody>
            
           </table>

          </td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>resolution</td>
          <td>resoluition of the output document</td>
          <td>most likely has no effect</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>dpi</td>
          <td>dpi to use while printing</td>
          <td>80</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>pageOffset</td>
          <td>integer added to page numbers generating headers, footers, and toc</td>
          <td class="empty">&nbsp;</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>copies</td>
          <td class="empty">&nbsp;</td>
          <td class="empty">&nbsp;</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>collate</td>
          <td>collate copies</td>
          <td>boolean</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>outline</td>
          <td>generate PDF outline</td>
          <td>boolean</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>outlineDepth</td>
          <td>maximum depth of outline</td>
          <td class="empty">&nbsp;</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>dumpOutline</td>
          <td>path of file to dump outline XML</td>
          <td class="empty">&nbsp;</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>out</td>
          <td>path of output file, if &quot;-&quot; stdout is used</td>
          <td class="empty">&nbsp;</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>documentTitle</td>
          <td>title for the output document</td>
          <td class="empty">&nbsp;</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>useCompression</td>
          <td>enable or disable lossless compression</td>
          <td>boolean</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>margin.top</td>
          <td>size of the top margin</td>
          <td>2cm</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>margin.bottom</td>
          <td>size of the bottom margin</td>
          <td>2cm</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>margin.left</td>
          <td>size of the left margin</td>
          <td>2cm</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>margin.right</td>
          <td>size of the right margin</td>
          <td>2cm</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>imageDPI</td>
          <td>maximum DPI for images in the output document</td>
          <td class="empty">&nbsp;</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
          <td>imageQuality</td>
          <td>the jpeg compression factor for images in the output document</td>
          <td>94</td>
          <td>&gt;= 0.1.0</td>
         </tr>

         <tr>
           <td>load.cookieJar</td>
           <td>path of file used to load and store cookies</td>
           <td>/tmp/cookies.txt</td>
           <td>&gt;= 0.1.0</td>
         </tr>

        </tbody>
       
      </table>

     </p>
    </dd>

   
  </dl>

 </div>


 



</div></div></div></body></html>